import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
  base: '/smartschool/work/',
  publicDir: 'public', // 确保此设置正确,
  plugins: [vue()],
  server: {
    port: 5174,
    open: true,
    // proxy: {
    //   '/api': {
    //     target: 'http://36.138.227.122:3389/smartschool/work/api/',
    //     changeOrigin: true,
    //     rewrite: (path) => path.replace(/^\/api/, '')
    //   }
    // }
  },
  resolve: {
    alias: {
      '@': '/src'
    }
  }
});
